Subversion : Install
2015/04/07 |
Install Subversion which is the revision control tool.
|
|
[1] | Install Subversion. |
[root@dlp ~]# yum -y install subversion
|
[2] | Create a repository. For example, create "/var/svn/repos/project" on here. |
[root@dlp ~]# mkdir -p /var/svn/repos/project [root@dlp ~]# svnadmin create /var/svn/repos/project [root@dlp ~]# svn mkdir file:///var/svn/repos/project/trunk -m "create" Committed revision 1. [root@dlp ~]# svn mkdir file:///var/svn/repos/project/branches -m "create" Committed revision 2. [root@dlp ~]# svn mkdir file:///var/svn/repos/project/tags -m "create" Committed revision 3. |
[3] | If some development files exist yet, it's possible to import it to a repository. For exmaple, import files under "/home/project" into the repository of above. |
[root@dlp ~]# svn import /home/project file:///var/svn/repos/project/trunk -m "initial import" Adding /home/project/count.cgi Adding /home/project/index.html Adding /home/project/main.php Committed revision 4. # confirm [root@dlp ~]# svn list file:///var/svn/repos/project/trunk count.cgi index.html main.php |
[4] | It's possible to access from other clients to run svnserve. svnserve listens on 3690/TCP, so allow it on firewalls on the network. |
# start svnserve on server [root@dlp ~]# /etc/rc.d/init.d/svnserve restart Starting svnserve: [ OK ] # access from a client (read only by default) [cent@client ~]$ svn list svn://dlp.srv.world/var/svn/repos/project branches/ tags/ trunk/ # check out [cent@client ~]$ svn checkout svn://dlp.srv.world/var/svn/repos/project A project/trunk A project/trunk/count.cgi A project/trunk/index.html A project/trunk/main.php A project/branches A project/tags Checked out revision 4. |
[5] | It's possible to access with SSH without svnserve. If you would not like to allow 3690/TCP or use authentication algorithm by SSH, use this way. |
[root@dlp ~]#
/etc/rc.d/init.d/svnserve stop Stopping svnserve: [ OK ] # access from a client with SSH [cent@client ~]$ svn list svn+ssh://cent@dlp.srv.world/var/svn/repos/project cent@dlp.srv.world's password: branches/ tags/ trunk/ |